package com.yzt.p_base.utils;

import android.text.TextUtils;
import android.util.Log;

import com.alibaba.ha.adapter.service.tlog.TLogService;

/**
 * author : bob
 * date   : 2022/11/29
 * desc   : 阿里云埋点日志
 */
public class TLogManager {

    public static void loge(String module, String tag, String content, Object... args) {
        if (!TextUtils.isEmpty(content) && args.length > 0) {
            content = String.format(content, args);
        }
        TLogService.loge(module, tag, content);

        Log.e("bobwang", content);

    }

    public static void logd(String module, String tag, String content, Object... args) {
        if (!TextUtils.isEmpty(content) && args.length > 0) {
            content = String.format(content, args);
        }
        TLogService.logd(module, tag, content);
        Log.e("bobwang", content);
    }

    public static void logi(String module, String tag, String content, Object... args) {
        if (!TextUtils.isEmpty(content) && args.length > 0) {
            content = String.format(content, args);
        }
        TLogService.logi(module, tag, content);
        Log.e("bobwang", content);
    }

    public static void logw(String module, String tag, String content, Object... args) {
        if (!TextUtils.isEmpty(content) && args.length > 0) {
            content = String.format(content, args);
        }
        TLogService.logw(module, tag, content);
        Log.e("bobwang", content);
    }
}
